package com.wwwarehouse.contract.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * 浏览商品Goods
 * Created by ShineF on 2017/10/25 0025.
 */

public class PlaceOrdersBrowseGoodsBean implements Parcelable {


    /**
     * total : 8
     * size : 5
     * itemList : [{"supplierLogo":null,"inventoryQty":8896,"resourceUkid":22122000000002006,"pbQtyUnit":"盒","payWay":null,"contractUkid":88810000000006000,"rsQty":null,"startValidTime":"2017-10-24 20:25:32","itemName":"TEST_商品十","payType":null,"validEndTime":null,"price":19,"itemPublishUkid":88820000000006002,"payment":null,"supplierBusinessId":10001641,"supplierName":"TEST_下单业务单位一","publishTime":"2017-10-24 20:25:32","validStartTime":null,"soldNum":null,"pbPrice":17,"tags":null,"qty":188,"payTypeValue":null,"pbQty":8896,"itemUrl":"/item/86c2d17838c24f648499ffe71a1fd0d4.png"},{"supplierLogo":null,"inventoryQty":569,"resourceUkid":22122200000001069,"pbQtyUnit":"件","payWay":null,"contractUkid":88810000000006000,"rsQty":null,"startValidTime":"2017-10-24 20:25:32","itemName":"TEST_商品八","payType":null,"validEndTime":null,"price":45.44,"itemPublishUkid":88820000000006005,"payment":null,"supplierBusinessId":10001641,"supplierName":"TEST_下单业务单位一","publishTime":"2017-10-24 20:25:32","validStartTime":null,"soldNum":null,"pbPrice":765.7,"tags":null,"qty":2764,"payTypeValue":null,"pbQty":569,"itemUrl":"/item/86c2d17838c24f648499ffe71a1fd0d4.png"},{"supplierLogo":null,"inventoryQty":1178,"resourceUkid":22122600000002087,"pbQtyUnit":"件","payWay":null,"contractUkid":88810000000006000,"rsQty":null,"startValidTime":"2017-10-24 20:25:32","itemName":"TEST_罗比罗丹 春光福碟水杯 创意花茶杯田园风居家送礼办公室玻璃水杯","payType":null,"validEndTime":null,"price":6.85,"itemPublishUkid":88820000000006008,"payment":null,"supplierBusinessId":10001641,"supplierName":"TEST_下单业务单位一","publishTime":"2017-10-24 20:25:32","validStartTime":null,"soldNum":null,"pbPrice":884.45,"tags":null,"qty":566,"payTypeValue":null,"pbQty":1178,"itemUrl":"/item/d54e0f3564af4acc91ed3cef28feda16.jpg"},{"supplierLogo":null,"inventoryQty":86,"resourceUkid":22122100000001090,"pbQtyUnit":"件","payWay":null,"contractUkid":88810000000006000,"rsQty":null,"startValidTime":"2017-10-24 20:25:32","itemName":"TEST_商品六","payType":null,"validEndTime":null,"price":33.85,"itemPublishUkid":88820000000006003,"payment":null,"supplierBusinessId":10001641,"supplierName":"TEST_下单业务单位一","publishTime":"2017-10-24 20:25:32","validStartTime":null,"soldNum":null,"pbPrice":235.65,"tags":null,"qty":133,"payTypeValue":null,"pbQty":86,"itemUrl":"/item/86c2d17838c24f648499ffe71a1fd0d4.png"},{"supplierLogo":null,"inventoryQty":66854,"resourceUkid":22122400000002072,"pbQtyUnit":"件","payWay":null,"contractUkid":88810000000006000,"rsQty":null,"startValidTime":"2017-10-24 20:25:32","itemName":"TEST_商品十八","payType":null,"validEndTime":null,"price":95.4,"itemPublishUkid":88820000000006006,"payment":null,"supplierBusinessId":10001641,"supplierName":"TEST_下单业务单位一","publishTime":"2017-10-24 20:25:32","validStartTime":null,"soldNum":null,"pbPrice":68.97,"tags":null,"qty":453,"payTypeValue":null,"pbQty":66854,"itemUrl":"/item/d54e0f3564af4acc91ed3cef28feda16.jpg"}]
     * page : 1
     * itemCount : 0
     */

    private int total;
    private int size;
    private int page;
    private int itemCount;
    private ArrayList<ItemListBean> itemList;

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getItemCount() {
        return itemCount;
    }

    public void setItemCount(int itemCount) {
        this.itemCount = itemCount;
    }

    public ArrayList<ItemListBean> getItemList() {
        return itemList;
    }

    public void setItemList(ArrayList<ItemListBean> itemList) {
        this.itemList = itemList;
    }

    public static class ItemListBean implements Parcelable {
        /**
         * supplierLogo : null
         * inventoryQty : 8896
         * resourceUkid : 22122000000002006
         * pbQtyUnit : 盒
         * payWay : null
         * contractUkid : 88810000000006000
         * rsQty : null
         * startValidTime : 2017-10-24 20:25:32
         * itemName : TEST_商品十
         * payType : null
         * validEndTime : null
         * price : 19
         * itemPublishUkid : 88820000000006002
         * payment : null
         * supplierBusinessId : 10001641
         * supplierName : TEST_下单业务单位一
         * publishTime : 2017-10-24 20:25:32
         * validStartTime : null
         * soldNum : null
         * pbPrice : 17
         * tags : null
         * qty : 188
         * payTypeValue : null
         * pbQty : 8896
         * itemUrl : /item/86c2d17838c24f648499ffe71a1fd0d4.png
         */

        private String supplierLogo;
        private int inventoryQty;
        private long resourceUkid;
        private String pbQtyUnit;
        private String payWay;
        private long contractUkid;
        private String rsQty;
        private String startValidTime;
        private String itemName;
        private String payType;
        private String validEndTime;
        private int price;
        private long itemPublishUkid;
        private String payment;
        private int supplierBusinessId;
        private String supplierName;
        private String publishTime;
        private String validStartTime;
        private String soldNum;
        private String pbPrice;
        private String tags;
        private int qty;
        private String payTypeValue;
        private int pbQty;
        private String itemUrl;

        public String getSupplierLogo() {
            return supplierLogo;
        }

        public void setSupplierLogo(String supplierLogo) {
            this.supplierLogo = supplierLogo;
        }

        public int getInventoryQty() {
            return inventoryQty;
        }

        public void setInventoryQty(int inventoryQty) {
            this.inventoryQty = inventoryQty;
        }

        public long getResourceUkid() {
            return resourceUkid;
        }

        public void setResourceUkid(long resourceUkid) {
            this.resourceUkid = resourceUkid;
        }

        public String getPbQtyUnit() {
            return pbQtyUnit;
        }

        public void setPbQtyUnit(String pbQtyUnit) {
            this.pbQtyUnit = pbQtyUnit;
        }

        public String getPayWay() {
            return payWay;
        }

        public void setPayWay(String payWay) {
            this.payWay = payWay;
        }

        public long getContractUkid() {
            return contractUkid;
        }

        public void setContractUkid(long contractUkid) {
            this.contractUkid = contractUkid;
        }

        public String getRsQty() {
            return rsQty;
        }

        public void setRsQty(String rsQty) {
            this.rsQty = rsQty;
        }

        public String getStartValidTime() {
            return startValidTime;
        }

        public void setStartValidTime(String startValidTime) {
            this.startValidTime = startValidTime;
        }

        public String getItemName() {
            return itemName;
        }

        public void setItemName(String itemName) {
            this.itemName = itemName;
        }

        public String getPayType() {
            return payType;
        }

        public void setPayType(String payType) {
            this.payType = payType;
        }

        public String getValidEndTime() {
            return validEndTime;
        }

        public void setValidEndTime(String validEndTime) {
            this.validEndTime = validEndTime;
        }

        public int getPrice() {
            return price;
        }

        public void setPrice(int price) {
            this.price = price;
        }

        public long getItemPublishUkid() {
            return itemPublishUkid;
        }

        public void setItemPublishUkid(long itemPublishUkid) {
            this.itemPublishUkid = itemPublishUkid;
        }

        public String getPayment() {
            return payment;
        }

        public void setPayment(String payment) {
            this.payment = payment;
        }

        public int getSupplierBusinessId() {
            return supplierBusinessId;
        }

        public void setSupplierBusinessId(int supplierBusinessId) {
            this.supplierBusinessId = supplierBusinessId;
        }

        public String getSupplierName() {
            return supplierName;
        }

        public void setSupplierName(String supplierName) {
            this.supplierName = supplierName;
        }

        public String getPublishTime() {
            return publishTime;
        }

        public void setPublishTime(String publishTime) {
            this.publishTime = publishTime;
        }

        public String getValidStartTime() {
            return validStartTime;
        }

        public void setValidStartTime(String validStartTime) {
            this.validStartTime = validStartTime;
        }

        public String getSoldNum() {
            return soldNum;
        }

        public void setSoldNum(String soldNum) {
            this.soldNum = soldNum;
        }

        public String getPbPrice() {
            return pbPrice;
        }

        public void setPbPrice(String pbPrice) {
            this.pbPrice = pbPrice;
        }

        public String getTags() {
            return tags;
        }

        public void setTags(String tags) {
            this.tags = tags;
        }

        public int getQty() {
            return qty;
        }

        public void setQty(int qty) {
            this.qty = qty;
        }

        public String getPayTypeValue() {
            return payTypeValue;
        }

        public void setPayTypeValue(String payTypeValue) {
            this.payTypeValue = payTypeValue;
        }

        public int getPbQty() {
            return pbQty;
        }

        public void setPbQty(int pbQty) {
            this.pbQty = pbQty;
        }

        public String getItemUrl() {
            return itemUrl;
        }

        public void setItemUrl(String itemUrl) {
            this.itemUrl = itemUrl;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.supplierLogo);
            dest.writeInt(this.inventoryQty);
            dest.writeLong(this.resourceUkid);
            dest.writeString(this.pbQtyUnit);
            dest.writeString(this.payWay);
            dest.writeLong(this.contractUkid);
            dest.writeString(this.rsQty);
            dest.writeString(this.startValidTime);
            dest.writeString(this.itemName);
            dest.writeString(this.payType);
            dest.writeString(this.validEndTime);
            dest.writeInt(this.price);
            dest.writeLong(this.itemPublishUkid);
            dest.writeString(this.payment);
            dest.writeInt(this.supplierBusinessId);
            dest.writeString(this.supplierName);
            dest.writeString(this.publishTime);
            dest.writeString(this.validStartTime);
            dest.writeString(this.soldNum);
            dest.writeString(this.pbPrice);
            dest.writeString(this.tags);
            dest.writeInt(this.qty);
            dest.writeString(this.payTypeValue);
            dest.writeInt(this.pbQty);
            dest.writeString(this.itemUrl);
        }

        public ItemListBean() {
        }

        protected ItemListBean(Parcel in) {
            this.supplierLogo = in.readString();
            this.inventoryQty = in.readInt();
            this.resourceUkid = in.readLong();
            this.pbQtyUnit = in.readString();
            this.payWay = in.readString();
            this.contractUkid = in.readLong();
            this.rsQty = in.readString();
            this.startValidTime = in.readString();
            this.itemName = in.readString();
            this.payType = in.readString();
            this.validEndTime = in.readString();
            this.price = in.readInt();
            this.itemPublishUkid = in.readLong();
            this.payment = in.readString();
            this.supplierBusinessId = in.readInt();
            this.supplierName = in.readString();
            this.publishTime = in.readString();
            this.validStartTime = in.readString();
            this.soldNum = in.readString();
            this.pbPrice = in.readString();
            this.tags = in.readString();
            this.qty = in.readInt();
            this.payTypeValue = in.readString();
            this.pbQty = in.readInt();
            this.itemUrl = in.readString();
        }

        public static final Creator<ItemListBean> CREATOR = new Creator<ItemListBean>() {
            @Override
            public ItemListBean createFromParcel(Parcel source) {
                return new ItemListBean(source);
            }

            @Override
            public ItemListBean[] newArray(int size) {
                return new ItemListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.total);
        dest.writeInt(this.size);
        dest.writeInt(this.page);
        dest.writeInt(this.itemCount);
        dest.writeList(this.itemList);
    }

    public PlaceOrdersBrowseGoodsBean() {
    }

    protected PlaceOrdersBrowseGoodsBean(Parcel in) {
        this.total = in.readInt();
        this.size = in.readInt();
        this.page = in.readInt();
        this.itemCount = in.readInt();
        this.itemList = new ArrayList<ItemListBean>();
        in.readList(this.itemList, ItemListBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<PlaceOrdersBrowseGoodsBean> CREATOR = new Parcelable.Creator<PlaceOrdersBrowseGoodsBean>() {
        @Override
        public PlaceOrdersBrowseGoodsBean createFromParcel(Parcel source) {
            return new PlaceOrdersBrowseGoodsBean(source);
        }

        @Override
        public PlaceOrdersBrowseGoodsBean[] newArray(int size) {
            return new PlaceOrdersBrowseGoodsBean[size];
        }
    };
}
